home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
asprog.EXE
/
MCD.ASM
< prev
next >
Wrap
Assembly Source File
|
1996-06-19
|
1KB
|
61 lines
; MD directory
; CD directory komutlarìnìn birleƒimi..
makedir macro dirname
lea dx,dirname
mov ah,39h
int 21h
endm
chdir macro dirname
lea dx,dirname
mov ah,3bh
int 21h
endm
clsspc macro
local done
done:
lodsb
cmp al,32
jz done
stosb
endm
cseg segment
assume cs:cseg,ds:cseg
org 100h
main proc near
cmp byte ptr ds:[80h],0 ;parametre girilmiƒmi ?
jz error ;parametre yoksa hata var.
lea di,dirname
mov si,81h ;program ile parametre arasìnda
clsspc ;bìrakìlan bosluklarì atla
done1:
lodsb ;parametreyi harf harf al.
cmp al,32
jz file1ok
cmp al,13
jz file1ok
stosb ;deºiskene yerlestir.
jmp done1
file1ok:
mov al,0 ;sonuna 0 koy.
stosb
makedir dirname ;directory'i yarat.
chdir dirname ;içine gir.
exit:
mov ah,4ch ;dos'a dön.
int 21h
error:
lea dx,errormsj ;yardìm mesajìnì
mov ah,9 ;görüntüle.
int 21h
jmp exit
errormsj db'MCD <[drive:][path] DIRNAME>',10,13,'$'
dirname db 64 dup (?)
main endp
cseg ends
end main
END.